var dialog = {
    // 错误弹出层
    error: function(message) {
        layer.open({
            content:message,
            icon:2,
            title : '错误提示',
        });
    },

    //成功弹出层
    success : function(message,url) {
        layer.open({
            content : message,
            icon : 1,
            yes : function(){
                location.href=url;
            },
        });
    },
    //iframe弹出层
    parentIframe : function(message,url) {
        layer.open({
            content : message,
            icon : 1,
            yes : function(){
                parent.location.href=url;
            },
        });
    },

    // 确认弹出层
    confirm : function(message, url) {
        layer.open({
            content : message,
            icon:3,
            btn : ['是','否'],
            yes : function(){
                location.href=url;
            },
        });
    },
    
    openContent : function (dialogLayer) {
        layer.open({
            type: 2,
            title: '发表内容',
            shadeClose: true,
            shade: 0.8,
            area: ['800px', '90%'],
            content: dialogLayer  //iframe的url
        });
    }
}

